#include "ACV_constantes.h"

R3F_FNCT_Broadcast_Server = {
	private ["_txt","_code"];
	_txt = _this select 0;
	if ((typeName _txt == "STRING") && (_txt != "")) then {
		_code = compile _txt;
		[ACV_BROADCAST_TO_SERVER,_code] call ACV_FNCT_BroadcastCode;
	};
};
R3F_FNCT_Broadcast_Client = {
	private ["_txt","_code"];
	_txt = _this select 0;
	if ((typeName _txt == "STRING") && (_txt != "")) then {
		_code = compile _txt;
		[ACV_BROADCAST_TO_CLIENT,_code] call ACV_FNCT_BroadcastCode;
	};
};
R3F_FNCT_Broadcast_One = {
	private ["_nick","_txt","_slot","_code"];
	_nick = _this select 0;
	if ((typeName _nick != "STRING") || (_nick == "")) exitWith {};
	_txt = _this select 1;
	if ((typeName _txt != "STRING") || (_txt == "")) exitWith {};
	_slot = [_nick] call R3F_FNCT_WhoIs;
	if !(isPlayer _slot) exitWith {};
	_code = compile _txt;
	[ACV_BROADCAST_TO_ONE,_code,objNull,_slot] call ACV_FNCT_BroadcastCode;
};
R3F_FNCT_Broadcast_ACV = {
	private ["_txt","_code"];
	_txt = _this select 0;
	if ((typeName _txt == "STRING") && (_txt != "")) then {
		_code = compile _txt;
		[ACV_BROADCAST_TO_ACV,_code] call ACV_FNCT_BroadcastCode;
	};
};
